"""The Home page of the app."""

from nextpy_org import styles
from nextpy_org.state import State 
from nextpy_org.templates import template

import nextpy as xt

@template(route="/", title="Home", on_load=State.sidebar_list)
def index() -> xt.Component:
    """ 
        Returns: The UI for the home page 
    """
    with open("README.md", encoding="utf-8") as readme:
        content = readme.read()
    return xt.markdown(content, component_map=styles.markdown_style)